1. Field of the Invention
The present invention relates to a motor controller which controls a DC (direct current) motor such as a wiper motor mounted on a vehicle.
2. Description of the Related Art
In a wiper mounted on a vehicle, operation of wiping a wind shield is performed by driving a wiper motor (DC motor) connected to a wiper blade. To drive and stop the wiper motor, an electronic switch to drive the wiper motor is provided between the wiper motor and a battery. To stop the wiper blade at a predetermined position of the windshield, an electronic switch to brake the motor is further provided (for example, see the Japanese Patent Laid-open Publication No. 6-343030).
FIG. 1 is a circuit diagram showing a configuration of a conventional motor controller to drive a wiper. This motor controller includes a motor drive switch SW101 and a brake switch SW102, each of which is composed of a MOSFET. The motor drive switch SW101 is disposed between a positive input terminal of a wiper motor M101 and a battery (DC power supply) B1 and switches on and off of the wiper motor M101 by controlling supply and stop of electric power to the positive input terminal of the wiper motor M101. In stopping the wiper, the brake switch SW102 grounds the positive input terminal of the wiper motor M101 to instantly stop the wiper.
The motor controller further includes a microcomputer 101 which totally controls drive and stop of the wiper by outputting to the motor drive switch SW101 a drive control signal to switch the wiper between being driven and stopped and outputting a brake signal to the brake switch SW102 in stopping the wiper.
Upon receiving a wiper drive instruction signal, the microcomputer 101 outputs the drive control signal to the motor drive switch SW101 to turn on the motor drive switch SW101 while setting the brake signal off, that is, while setting the brake switch SW102 off. Driving power is thus supplied to the wiper motor M101, and the wiper motor M101 is driven.
Thereafter, upon receiving a wiper stop instruction signal, the microcomputer 101 stops outputting the drive control signal to the motor drive switch SW101 and monitors an output current monitor signal outputted from the motor drive switch SW101 by means of an A/D converter or the like. After confirming that current flowing through the motor drive switch SW101 is shut off, the microcomputer 101 outputs the brake signal to the brake switch SW102. The brake switch SW102 is turned on, and the positive input terminal of the wiper motor M101 is grounded. The wiper motor M101 is thus instantly stopped. Therefore, the wiper blade can be stopped at a desired position.